package com.briup.cms.dao;
/**
 * @program: Consult_Management_Syetem1
 * @description:
 * @author: 张琰
 * @create: 2020-07-02*
 **/
import com.briup.cms.bean.Role_privilege;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.mapstruct.Mapper;

import java.util.List;
@Mapper
public interface Role_privilegeMapper {
    @Select("select * from cms_role_privilege")
    List<Role_privilege> selectAll();
    @Insert("insert into cms_role_privilege values(null,#{roleId},#{privilegeId})")
    void insert(Role_privilege role_privilege);

    @Update("update cms_role_privilege set role_id=#{roleId},privilege_id=#{privilegeId} where id=#{id}")
    void update(Role_privilege role_privilege);

    @Delete("delete from cms_role_privilege where id = #{id}")
    void deleteById(long id);
}
